package Nivel;
// Generated 05/07/2011 23:11:13 by Hibernate Tools 3.2.1.GA

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Transient;
import setor.Setor;
import subSetor.SubSetor;

/**
 * Nivel generated by hbm2java
 */
@Entity
@Table(name = "nivel", schema = "public")
@NamedQuery(name="nivel.listar", query="from Nivel")
public class Nivel implements java.io.Serializable {

    private int idNivel;
    private SubSetor subSetor;
    private String descricaoNivel;
    private Boolean StatusNivel;

    public Nivel() {
    }

    public Nivel(int idNivel) {
        this.idNivel = idNivel;
    }

    public Nivel(int idNivel, SubSetor subSetor, String descricaoNivel, Boolean StatusNivel) {
        this.idNivel = idNivel;
        this.subSetor = subSetor;
        this.descricaoNivel = descricaoNivel;
        this.StatusNivel = StatusNivel;
    }
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id_nivel", unique = true, nullable = false)
    public int getIdNivel() {
        return this.idNivel;
    }

    public void setIdNivel(int idNivel) {
        this.idNivel = idNivel;
    }
    
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "id_sub_setor")
    public SubSetor getSubSetor() {
        return this.subSetor;
    }

    public void setSubSetor(SubSetor subSetor) {
        this.subSetor = subSetor;
    }
    
    @Column(name = "status_nivel")
    public Boolean getStatusNivel() {
        return StatusNivel;
    }

    public void setStatusNivel(Boolean StatusNivel) {
        this.StatusNivel = StatusNivel;
    }
    
    @Column(name = "descricao_nivel")
    public String getDescricaoNivel() {
        return descricaoNivel;
    }

    public void setDescricaoNivel(String descricaoNivel) {
        this.descricaoNivel = descricaoNivel;
    }
        
}